package com.sansan.qiangji.controller.device;

import com.sansan.qiangji.realize.device.StackerParamDetailReal;
import com.sansan.qiangji.resultVO.ResultVO;
import com.sansan.qiangji.utils.ResultVOUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@CrossOrigin()
@RestController
@RequestMapping("/stackerParamDetail")
@Slf4j
public class StackerParamDetailController {
    private StackerParamDetailReal stackerParamDetailReal;

    @Resource
    public void setStackerParamDetailReal(StackerParamDetailReal stackerParamDetailReal){
        this.stackerParamDetailReal = stackerParamDetailReal;
    }

    @PostMapping("/changeStackerParamDetailValue")
    public ResultVO<Object> changeStackerParamDetailValue(@RequestParam(name = "stackerName") String stackerName,
                                                          @RequestParam(name = "stackerParamName") String stackerParamName,
                                                          @RequestParam(name = "stackerParamChangeValue") Long stackerParamChangeValue) {
        stackerParamDetailReal.changeStackerParamDetailValue(stackerName, stackerParamName, stackerParamChangeValue);
        return ResultVOUtil.success(null);
    }
}
